using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Threading.Tasks;

namespace WeChat.Api.Common
{
    public class WeChatConfig
    {
        /// <summary>
        /// 直连商户申请的公众号或移动应用appid。
        /// </summary>
        public static string appid => "wx34d528754a5370e8";

        /// <summary>
        /// AppSecret，app端加密解密使用
        /// </summary>
        public static string AppSecret => "2fe62021f48ecbb920f0da779d263bf3";

        /// <summary>
        /// 密钥，用商户平台上设置的APIv3密钥【微信商户平台—>账户设置—>API安全—>设置APIv3密钥】，记为key；
        /// </summary>
        public static string APIV3Key => "jbjhhzstsl9bldhbfh0jbjgtmjbbfzrq";

        /// <summary>
        /// 直连商户的商户号，由微信支付生成并下发。
        /// </summary>
        public static string mchid => "1632719416";

        /// <summary>
        /// 证书序列号
        /// 查看证书序列号：https://wechatpay-api.gitbook.io/wechatpay-api-v3/chang-jian-wen-ti/zheng-shu-xiang-guan#ru-he-cha-kan-zheng-shu-xu-lie-hao
        /// </summary>
        public static string serialNo => "6E96614D1D0541B8B59EEEA55A1228F811BAE153";

        /// <summary>
        /// key  私钥
        /// 私钥和证书：https://wechatpay-api.gitbook.io/wechatpay-api-v3/ren-zheng/zheng-shu#sheng-ming-suo-shi-yong-de-zheng-shu
        /// </summary>
        public static string privateKey => FileHelper.ReadFile(Directory.GetCurrentDirectory()+"/UpFile/WeChatKey/key.txt", "utf-8");
    }
}
